package com.blog.common.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.blog.common.domain.annotation.Convert;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 友链列表
 * </p>
 *
 * @author Valerie
 * @since 2023-03-11
 */
@Getter
@Setter
@TableName("tb_friend_link")
@ApiModel(value = "FriendLink对象", description = "友链列表")
public class FriendLink implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("链接名")
    @TableField("link_name")
    private String linkName;

    @ApiModelProperty("分类id")
    @TableField("category_id")
    private Long categoryId;

    @ApiModelProperty("链接地址")
    @TableField("link_address")
    private String linkAddress;

    @ApiModelProperty("链接封面")
    @TableField("link_cover")
    private String linkCover;

    @ApiModelProperty("链接介绍")
    @TableField("link_intro")
    private String linkIntro;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty("1 删除 0 未删除")
    @TableField("is_delete")
    @TableLogic
    private Integer isDelete;

    @ApiModelProperty("链接头像")
    @TableField("link_avatar")
    @Convert
    private String linkAvatar;
}
